//
// Created by AnTler on 2018/11/29.
//

#ifndef LUA_INPUTUTILS_H
#define LUA_INPUTUTILS_H

#include "common/log.h"

#define KEY_HOME (3)
#define KEY_BACK (4)
#define KEY_MENU (82)
#define KEY_POWER (26)
#define KEY_VOLUME_UP (24)
#define KEY_VOLUME_DOWN (25)

namespace TouchUtils {
    void down(int index, int x, int y);

    void move(int index, int x, int y);

    void up(int index, int x, int y);

    void tap(int x, int y);

    void swipe(int x1, int y1, int x2, int y2, int duration);

    void press(int keyCode, bool longPress);

    void press(const char *keyName, bool longPress);

    void doublePress(int keyCode);

    void doublePress(const char *keyName);
};

#endif //LUA_INPUTUTILS_H
